<template>
  <div class="products">
    <div
      class="product_item"
      v-for="item in products.slice(0, 3)"
      :key="item.id"
    >
      <img :src="item.image" alt="" class="pic" />
      <div class="item_r">
        <h3 class="r_t">{{ item.storeName }}</h3>
        <div class="r_b">
          <div class="text">
            <span class="pink">￥{{ item.price }}</span>
            <span class="sales">销量{{ item.sales }}</span>
          </div>
          <van-icon name="cart-circle" class="cart" />
        </div>
        <div class="cart"></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "FxhDemoProduct",
  props: ["products"],
  data() {
    return {};
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
.products {
  padding-top: 15px;
  width: 345px;
  background: white;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  .product_item {
    @include between;
    padding: 10px;
    box-sizing: border-box;
    width: 325px;
    height: 107px;
    .pic {
      width: 90px;
      height: 90px;
      border-radius: 5px;
      margin-right: 5px;
    }
    .item_r {
      @include cloumn;
      justify-content: space-between;
      .r_t {
        width: 210px;
        height: 40px;
        font-size: 15px;
        font-weight: 400;
        color: #333;
        line-height: 20px;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .r_b {
        @include between;
        width: 224px;
        .text {
          @include flex;
          .pink {
            color: #ff448f;
            font-weight: 600;
            line-height: 13px;
            font-size: 18px;
            margin: 5px;
          }
          .sales {
            font-size: 12px;
            line-height: 23px;
            color: #999;
            font-weight: 400;
          }
        }
        .cart {
          font-size: 24px;
          font-weight: 400;
          color: #ff448f;
        }
      }
    }
  }
}
</style>
